#ifndef GAMEMANAGER_H
#define GAMEMANAGER_H
#include <QGlobalStatic>
#include "QObject"
#include "utils/win32util.h"
#include "QTimer"
#include "QRectF"
#include "utils/imghelper.h"
#include "QString"
#include "bean/citynode.h"
#include "bean/rolebean.h"

class GameManager:public QObject
{
    Q_OBJECT
public:
    enum RunStatue{
        StateGoGroup = 0,
        StateGroup = 1,
        StateLeave = 2,
        StateRemoteCity = 3,
        StateBack = 4,
        StateTurn = 5
    };


public:
    explicit GameManager(QObject *parent = nullptr);
    static GameManager* getInstantce();
    HWND wHandle;
    HANDLE hProcess = 0;
    DWORD baseAddress;


    //玩家位置 0正常状态 1地府
    int roleLocation;
    //玩家当前执行的任务 //0空闲状态 1跑商
    int roleTask;

    //否进入标记位
    bool isCheckHell = true;
    bool isMove = false;
    bool isNeedCheckMove = false;
//    int runStatue = 0; //0本帮派购买卖商品中，1是从帮派去对方的路上, 2对方购买卖商品中， 3是从对方回帮派的路上

    CityNode *currentCity; //角色当前位置

    RoleBean *currentRole;

    //网络请求相关
    qulonglong invalidTime = 0; //卡密剩余时间，时间戳形式
    QString token;

    QRect gameRect; //游戏窗口大小

};

#endif // GAMEMANAGER_H
